<template>
    <el-row :gutter="10" class="project">
        <el-col :xs="12" :sm="12" :md="12" :lg="8" :xl="8">
            <div class="project-list">
                <div class="project-list-left">
                    <react class="project-list-left-icon" />
                </div>
                <div class="project-list-right">
                   {{totalNums.totalTechnology}}
                    篇
                </div>
            </div>
        </el-col>
        <el-col :xs="12" :sm="12" :md="12" :lg="8" :xl="8">
            <div class="project-list">
                <div class="project-list-left">
                    <food class="project-list-left-icon" />
                </div>
                <div class="project-list-right">
                    {{totalNums.totalFood}}
                    篇
                </div>
            </div>
        </el-col>
        <el-col :xs="12" :sm="12" :md="12" :lg="8" :xl="8">
            <div class="project-list">
                <div class="project-list-left">
                    <travel class="project-list-left-icon" />
                </div>
                <div class="project-list-right">
                    {{totalNums.totalTravel}}
                    篇
                </div>
            </div>
        </el-col>
        <el-col :xs="12" :sm="12" :md="12" :lg="8" :xl="8">
            <div class="project-list">
                <div class="project-list-left">
                    <assess class="project-list-left-icon" />
                </div>
                <div class="project-list-right">
                    {{ totalNums.totalAssess }}
                    条
                </div>
            </div>
        </el-col>
        <el-col :xs="12" :sm="12" :md="12" :lg="8" :xl="8">
            <div class="project-list">
                <div class="project-list-left">
                    <greate class="project-list-left-icon" />
                </div>
                <div class="project-list-right">
                    {{totalNums.totalVisited }}
                    个
                </div>
            </div>
        </el-col>
    </el-row>
</template>

<script>
import travel from '@/assets/icon/travel.svg'
import food from '@/assets/icon/food.svg'
import react from '@/assets/icon/react.svg'
import assess from '@/assets/icon/assess.svg'
import greate from '@/assets/icon/greate.svg'
import korvue from '@/assets/icon/korvue.svg'
import {statisticsTotal} from '@/assets/api/utils.js'
export default {
    data(){
        return {
            startVal: 0,
            endVal: 10,
            totalNums:{
                totalTechnology:0,
                totalFood:0,
                totalTravel:0,
                totalAssess:0,
                totalVisited:0,
            }
        }
    },
    components:{
        travel,
        food,
        react,
        assess,
        korvue,
        greate,
    },
    mounted(){
       this.statisticNums();
    },
    methods:{
       statisticNums(){
        statisticsTotal().then((resp)=>{
            if(resp.code==200){
                 this.totalNums=resp.data
            }
        })
       }
    }
}
</script>

<style scoped>
.project{
    width: 100%;
    height: auto;
}
.project-list{
    width: 100%;
    height: 108px;
    /* background: #f7f7f7; */
    border-radius: 5px;
    cursor: pointer;
    padding: 14px;
    box-sizing: border-box;
    background: url('../../assets/image/vue.png');
    background-size: 100% 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.project-list-left{
    padding: 16px;
    box-sizing: border-box;
    width: 80px;
    height: 80px;
    border-radius: 5px;
}
.project-list-left:hover{
    background: #E84D67;
}
.project-list-left:hover .project-list-left-icon{
    color: #ffffff;
}
.project-list-left-icon{
    width: 48px;
    height: 48px;
    fill: currentColor; 
    color: #ffffff;
    
}
.project-list-right{
    flex: 1;
    color: #EA4E68;
    font-weight: bolder;
    font-size: 30px;
    line-height: 80px;
    text-align: right;
    color: #ffffff;
}
</style>